<template>
  <div>
    <span v-for="(val,index) in err" :key="index">
      <input type="checkbox" :value="val" v-model="kbox">{{val}}
    </span>
    <p>累加值为{{sum}}</p>
  </div>
</template>

<script>
export default {
  data () {
    return {
      err: [9, 15, 19, 25, 29, 31, 48, 57, 62, 79, 87],
      kbox: []
    }
  },

  created () {

  },
  computed: {
    sum () {
      return this.kbox.reduce((a, b) => {
        a = b * a
        return a
      }, 0)
    }
  },
  methods: {

  }
}
</script>

<style scoped lang='less'>

</style>
